Setting Up
Download & Extract Dataset
We downloaded a few random TikTok videos for the purpose of this demonstration. Feel free to use your own video dataset. Let’s download the TikTok videos into our local folder.From Videos to Images
fastdup works on images. We must first extract frames from the videos using a one-liner fastdup utility function.frames/folder which stores all the frames extracted from the videos.
Run fastdup
Now that we have the frames of images, let’s run fastdup and analyze the frames.Components Gallery
We can visualize the cluster of similar detections using the components gallery view. Specifydraw_bbox=True to see the detection bounding box on the original image.
Similarity Gallery
Using thesimilarity_gallery view, we can find similar looking faces (bounding boxes) across all the extracted frames.
Duplicates Gallery
With theduplicates_gallery view, visualize duplicate image pairs across videos.
Outliers Gallery
Using theoutliers_gallery we can also visualize faces (detections) that looks visually different from others.
Stats Gallery
You can visualize the faces using various metrics using thestats_gallery.
Dark Objects
Specifyingmetric='dark' sorts the detections in an ascending order of image mean value.
Bright Objects
Conversely, specifyingmetric='bright'sorts the detections in descending order of image mean value.
Blurry Objects
Finally, specifyingmetric='blur'ranks the images in ascending ‘blurriness’.
